import { App } from './App';
import { Header } from '../componets/header';
import { Footer } from '../componets/footer';
import { Tab } from '../componets/tab';
import { ShowBoard } from '../componets/show_board';
import tools from '../utils/tools';

class List extends App {
  constructor () {
    super({
      swiper: false,
      phone: true,
      field: true
    })
    this.keyword = tools.getUrlQueryValue('keyword');
  }
  render () {
    const oTab = new Tab(this.$app, this.cache.filedDatas, this.cache.phoneDatas);
    new Header(this.$app, this.cache.filedDatas, this.cache.phoneDatas).init();
    oTab.init();
    new ShowBoard(this.$app, oTab.filterDatas('all', this.cache.phoneDatas, this.keyword)).init()
    new Footer(this.$app).init();
    $('body').prepend(this.$app);
  }
}
new List();